#! /usr/bin/python3
# _*_ coding:UTF-8 _*_
"""
    实例属性：self.
    类属性：直接在类中定义的属性
"""


# python 可以绑定任意的属性到类的实例中
class Student(object):
    # 类的属性
    count = 0

    def __init__(self, name):
        # 实例的属性 类的属性不含实例的属性，实例的属性包含类的属性，
        self.name = name


def main():
    s = Student('王楠')
    s.score = 90
    print('%s的score是%d' % (s.name, s.score))
    # print(dir(Student))
    # print(dir(s))
    # Student.name     # AttributeError:type object 'Student' has no attribute 'name'
    print(s.count)


if __name__ == '__main__':
    main()
